import Taro from "@tarojs/taro";
// import Api from "@/api";//api 引入全局的方式之一，暂时不开放

let newTaro = Taro;

// 全局静态变量02
const globalDatas = {
	demo: "",
};

// 页面分享
const sharePage = (menus = ["shareAppMessage", "shareTimeline"]) => {
	if (Taro.getEnv() === Taro.ENV_TYPE.WEAPP) {
		Taro.showShareMenu({
			withShareTicket: true,
			menus
		});
	}
};

newTaro.$globalDatas = globalDatas;
// newTaro.$api = Api; 
newTaro.$sharePage = sharePage;

export const getCurrentInstance = newTaro.getCurrentInstance;
export default newTaro;
